package de.tum.in.eist.poll.pub.shared;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

public class Lecturer extends User {
	
	Set<Integer> lectures = new HashSet<Integer>();
	
	public Lecturer() {
		
	}
	
	public Lecturer(int id, String name, Set<Integer> lectures) {
		super(id, name);
		this.lectures = lectures;
	}
	
	public Lecturer(int id, String name, int[] lectures) {
		super(id, name);
		for(int i = 0; i < lectures.length; i++){
			this.lectures.add(lectures[i]);
		}
	}
	
	public List<Integer> getLectures(){
		Integer[] array = lectures.toArray(new Integer[0]);
		List<Integer> res = new LinkedList<Integer>();
		for (int i = 0; i < array.length; i++){
			res.add(array[i]);
		}
		return res;
	}
}
